package com.dingreading.cloud.mall.service;

import com.dingreading.cloud.common.util.PageUtil;
import com.dingreading.cloud.mall.dto.CouponStaffDto;
import com.dingreading.cloud.mall.entity.CouponStaff;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;

import java.util.List;

/**
 * 服务层。
 *
 * @author Administrator
 * @since 2023-11-22
 */
public interface CouponStaffService extends IService<CouponStaff> {

    Page<CouponStaff> pageList(PageUtil pageUtil, String keyword, Integer enabled);

    CouponStaff getStaffCoupon(String storeUid, String staffUid, Long id);

    CouponStaffDto dtoGetStaffCoupon(String storeUid, String staffUid, Long id);

    boolean updateMoney(String storeUid, String staffUid, Long id, double usedMoney, double usableMoney);

    List<CouponStaffDto> getOrderUseCouponV2(String storeUid, String staffUid, double useCouponPrice, List<Long> goodsIdList, List<Long> categoryIdList);

    List<CouponStaffDto> getOrderNotUseCouponV2(String storeUid, String staffUid, List<Long> couponStaffIds);

    // 获取用户可用的抵扣券
    List<CouponStaff> staffUseCouponList(String storeUid, String staffUid);

    // 获取用户可用的商品抵扣券
    List<CouponStaff> staffUseGoodsCouponList(String storeUid, String staffUid);

}
